"""
配置文件，包含所有可配置参数。
"""
import tempfile

# Elasticsearch 配置
ELASTICSEARCH_HOSTS = ["http://119.23.229.39:39200"]
ELASTICSEARCH_REQUEST_TIMEOUT = 10

# FastAPI 配置
FASTAPI_HOST = "0.0.0.0"
FASTAPI_PORT = 8990

# 日志配置
LOG_LEVEL = "INFO"
LOG_FILE = "handband_collector.log"

# 业务配置
BATCH_SIZE = 100  # 批量存储大小
MAX_RETRIES = 3  # 最大重试次数
RETRY_DELAY = 1  # 重试延迟（秒）

# 时间timestamp 基准值
BASE_TIMESTAMP = 1735660800  # 基础timestamp 值,目的是缩小比对时间所需要的内存值

# 旷工阈值(秒)
NOT_WORK_MILLION = 7200

CONFIG = {
    "email": {
        "smtp_server": "smtp.qq.com",
        "smtp_port": 465,
        "sender_email": "65900370@qq.com",
        "sender_password": "jqrwitalfqakbjdj",
        "use_ssl": True
    },
    "pdf": {
        "wkhtmltopdf_path": r"E:\\wkhtmltopdf\bin\wkhtmltopdf.exe",
        "temp_dir": tempfile.gettempdir()
    },
    "logging": {
        "log_file": "report_generator.log",
        "level": "INFO"
    },
    "oss": {
        "access_key_id": "LTAI5tJy1axoohNuyDZDVdi3",
        "access_key_secret": "KMC6Ebvn0SyUc3WFGuJbnPLaiveezh",
        "endpoint": "oss-cn-shenzhen.aliyuncs.com",
        "bucket_name": "landiwulian",
        "region": "cn-shenzhen"
    }
}
